//
// Created by sjjmw on 2/23/2022.
//

#ifndef LEETCODE__17_H
#define LEETCODE__17_H


#include "iostream"
int main(){
    int n,m;
    while (scanf("%d %d",&n,&m) != EOF /* condition */)
    {
        for(int i=0;i<m;i++){
            for(int j=0;j<i+1;j++){
                if(j!=0){
                    printf(" ");
                }
                printf("%d",n);
                n++;
                if(n==10){
                    n=1;
                }
            }
            printf("\n");
        }
    }
    return 0;
}


#endif //LEETCODE__17_H
